<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <title>if else</title>
  </head>
  <body>
    <div class="" id="app">
      <template v-if="ok">
        <h1>Title</h1>
        <p>Paragraph 1</p>
        <p>Paragraph 2</p>
      </template>
      <template v-else>
        <p>
          没有数据
        </p>
      </template>
    </div>
    <script src="js/jquery-1.8.3.min.js" charset="utf-8"></script>
    <script src="js/vue.js" charset="utf-8"></script>
    <script type="text/javascript">
      var vm;
      $(function(){
        vm = new Vue({
          el:"#app",
          data:{
            ok:true
          }
        })
      })
    </script>
  </body>
</html>
